﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example.Persistence
{
    public abstract class Entity
    {
        private Guid id;

        public Guid Id
        {
            get
            {
                if (this.id == Guid.Empty)
                {
                    this.id = Guid.NewGuid();
                }

                return this.id;
            }
            set { this.id = value; }
        }
    }
}
